package cn.iocoder.yudao.module.shop.info.vo;

import cn.iocoder.yudao.framework.business.basic.enums.RecommendEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.framework.validation.InEnumValue;
import cn.iocoder.yudao.module.api.shop.info.enums.ShopOwnerTypeEnum;
import cn.iocoder.yudao.module.api.shop.info.enums.ShopStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "店铺信息查询 Request VO")
@Data
public class AdminShopInfoQueryDTO extends ShopInfoQueryDTO {

    @Schema(description = "商家类型：0-实体店（线下实体门店）、1-中间商（线上进货零售）、2-供货商（线上供应货物）", example = "1")
    @InEnumValue(value = ShopOwnerTypeEnum.class, message = "类型必须是 {value}")
    private Integer type;

    @Schema(description = "是否平台自营", example = "false")
    private Boolean selfOperated;

    @Schema(description = "推荐类型：0-无、1-精选、2-热门、99-置顶", example = "0")
    @InEnumValue(value = RecommendEnum.class, message = "推荐类型必须是 {value}")
    private Integer recommend;

    @Schema(description = "状态", example = "1")
    @InEnum(value = ShopStatusEnum.class, message = "状态必须是 {value}")
    private Integer status;

    @Schema(description = "入驻时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] enterTime;

    @Schema(description = "过期时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] expireTime;

}
